package com.zkthink.ceres.common.enums;

public enum WxAPIHttpUrl {
    /**
     * 获取token接口url
     * <p>参数依次为：appid,secret
     */
    GET_TOKEN_URL("https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid={0}&secret={1}", "获取token接口url"),

    /**
     * 拉微信用户信息接口url
     * <p>参数依次为：access_token,openid
     */
    GET_USERINFO_URL("https://api.weixin.qq.com/sns/userinfo?access_token={0}&openid={1}", "拉微信用户信息接口url"),

    /**
     * 根据code获取用户openid的接口url
     * <p>参数依次为：appid,secret,code
     * <p>参数依次为：appid,secret,code
     */
    GET_OPENID_URL("https://api.weixin.qq.com/sns/oauth2/access_token?appid={0}&secret={1}&code={2}&grant_type=authorization_code", "根据code获取用户openid的接口url");

    private String apiUrl;

    private String description;

    private WxAPIHttpUrl(String url, String desc) {
        this.apiUrl = url;
        this.description = desc;
    }

    public String getApiUrl() {
        return apiUrl;
    }

    public void setApiUrl(String apiUrl) {
        this.apiUrl = apiUrl;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

}
